4.7.2. Example — successful update
The event to be updated is represented by the following XML.
<ns3:icalendar> <ns3:vcalendar> <ns3:components> <ns3:vevent> <ns3:properties> <ns3:uid> <ns3:text>1302064354993-a</ns3:text> </ns3:uid> <ns3:summary> <ns3:text>try this</ns3:text> </ns3:summary> <ns3:dtstart> <ns3:date-time>2011-07-18T15:00:00Z</ns3:date-time> </ns3:dtstart> <ns3:dtend> <ns3:date-time>2011-07-18T16:00:00Z</ns3:date-time> </ns3:dtend> </ns3:properties> </ns3:vevent> </ns3:components> </ns3:vcalendar> </ns3:icalendar>
In the following example we make the following changes to the above event:
Change the summary
Change the
dtstart
— add atzid
and change the value to local timeAdd some categories
We first select an event by specifying the uid
value and then, from that event, we select the properties, then select and change the appropriate properties.
>>Request <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Header/> <SOAP-ENV:Body> <ns2:updateItem xmlns:ns2="http://docs.oasis-open.org/ws-calendar/ns/soap" xmlns:ns3="urn:ietf:params:xml:ns:icalendar-2.0"> <ns2:href>/user/douglm/calendar/1302064354993-a.ics</ns2:href> <ns2:changeToken>"20110802T032608Z-0" null</ns2:changeToken> <ns2:select> <ns3:vcalendar/> <ns2:components> <ns2:component> <ns3:vevent> <ns3:properties> <ns3:uid> <ns3:text>1302064354993-a</ns3:text> </ns3:uid> </ns3:properties> </ns3:vevent> <ns2:properties> <ns2:property> <ns3:dtstart> <ns3:date-time>2011-07-18T15:00:00Z</ns3:date-time> </ns3:dtstart> <ns2:parameters> <ns2:add> <ns3:tzid> <ns3:text>America/New_York</ns3:text> </ns3:tzid> </ns2:add> </ns2:parameters> <ns2:change> <ns3:dtstart> <ns3:date-time>2011-07-18T11:00:00</ns3:date-time> </ns3:dtstart> </ns2:change> </ns2:property> <ns2:property> <ns3:summary> <ns3:text>try this</ns3:text> </ns3:summary> <ns2:change> <ns3:summary> <ns3:text>A changed summary - again and again and again</ns3:text> </ns3:summary> </ns2:change> </ns2:property> <ns2:add> <ns3:categories> <ns3:text>newcategory-2</ns3:text> <ns3:text>resources</ns3:text> <ns3:text>paper</ns3:text> </ns3:categories> </ns2:add> </ns2:properties> </ns2:component> </ns2:components> </ns2:select> </ns2:updateItem> </SOAP-ENV:Body> </SOAP-ENV:Envelope> >>Response <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Header/> <SOAP-ENV:Body> <ns2:updateItemResponse xmlns:ns2="http://docs.oasis-open.org/ws-calendar/ns/soap" xmlns:ns3="urn:ietf:params:xml:ns:icalendar-2.0"id="0"> <ns2:status>OK</ns2:status> </ns2:updateItemResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope>